package chan.project.smartlawlawyer.service;

import chan.project.smartlawmodel.dto.lawyer.LawyerInfoQueryRequest;
import chan.project.smartlawmodel.entity.LawyerInfo;
import chan.project.smartlawmodel.vo.LawyerInfoVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;


/**
 * 律师服务
 *
 * @author <a href="https://github.com/kavansp">kavansp</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
public interface LawyerInfoService extends IService<LawyerInfo> {

    /**
     * 校验数据
     *
     * @param lawyerInfo
     * @param add 对创建的数据进行校验
     */
    void validLawyerInfo(LawyerInfo lawyerInfo, boolean add);

    /**
     * 获取查询条件
     *
     * @param lawyerInfoQueryRequest
     * @return
     */
    QueryWrapper<LawyerInfo> getQueryWrapper(LawyerInfoQueryRequest lawyerInfoQueryRequest);
    
    /**
     * 获取律师封装
     *
     * @param lawyerInfo
     * @param request
     * @return
     */
    LawyerInfoVO getLawyerInfoVO(LawyerInfo lawyerInfo, HttpServletRequest request);

    /**
     * 分页获取律师封装
     *
     * @param lawyerInfoPage
     * @param request
     * @return
     */
    Page<LawyerInfoVO> getLawyerInfoVOPage(Page<LawyerInfo> lawyerInfoPage, HttpServletRequest request);
}
